package com.example.school.controller.admin;

import com.example.school.dto.AdminGetListDto;
import com.example.school.service.OrdersService;
import com.example.school.utils.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/orders")
public class AdminOrdersController {

    @Autowired
    private OrdersService ordersService;

    @PostMapping("get_orders_list")
    public Result getOrdersList(@RequestBody AdminGetListDto dto){
        return ordersService.getOrdersList(dto);
    }

}
